package com.chinasofti.buffered;

import java.io.*;

public class Demo03 {
    public static void main(String[] args) throws IOException {
        //字节缓冲输出流
        method1();



    }

    private static void method1() throws IOException {
        BufferedInputStream bis =
                new BufferedInputStream(new FileInputStream("D:\\视频\\录屏\\League of Legends\\League of Legends 2023.02.11 - 17.32.59.01.mp4"));

        BufferedOutputStream bos =
                new BufferedOutputStream(new FileOutputStream("java0419\\League of Legends 2023.02.11 - 17.32.59.01.mp4"));
        byte[] by = new byte[1024];
        int len;
        while ((len = bis.read())!= -1){
            bos.write(by,0,len);
        }
        bis.close();
        bos.close();
    }
}